<?php
$T->loadTpl("./html/".$template."/".$qname.".html");
$T->SetTpl('cssjs','html/cssjs.inc'); 
$T->SetTpl('jsmodel','html/jsmodel.inc');


$id=isset($_GET["id"])?$_GET["id"]:"0";
if($id!="0") {
    $dict = $T->db->query("SELECT * FROM sys_takes_list where id = ".$id)->fetch(PDO::FETCH_ASSOC);
    $T->Set("id",$dict["id"]);
    $T->Set("release_user", $dict["release_user"]);
    $T->Set("agent", $dict["agent"]);
    $T->Set("takes_type", $dict["takes_type"]);
    $T->Set("code", $dict["code"]);
    $T->Set("takes_user", $dict["takes_user"]);
    $T->Set("contact_phone", $dict["contact_phone"]);
    $T->Set("release_time", $dict["release_time"]);
    $T->Set("takes_time", $dict["takes_time"]);
    $T->Set("project_type", $dict["project_type"]);
    $T->Set("release_user_id", $dict["release_user_id"]);
    $T->Set("department", $dict["department"]);

}else{
    $T->Set("id","");
}
$T->SetBlock("list_department","SELECT id,deptname FROM sys_department");
$T->SetBlock("repair_type","SELECT * FROM sys_equipment_repair where is_flag_delete = 0 order by id desc");
$T->Set("template",$template);         
$T->clearNaN();       
$T->clearNoN();
$T->display();  